﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using BskLeague.Models;
using System.Data.Entity;

namespace BskLeague.Controllers
{
    public class HomeController : Controller
    {
        BskLeagueDB _db = new BskLeagueDB();

        public ActionResult Index()
        {



            ViewBag.Message = "Welcome to ASP.NET MVC!";

            return View();
        }

        public ActionResult About()
        {
            //IList<SeasonTeamPlayer> stp1 = _db.SeasonTeamPlayers.ToList();
            IList<Player> players = _db.Players.ToList<Player>();
            IList<Team> teams = _db.Teams.ToList<Team>();
            IList<Season> seasons = _db.Seasons.ToList<Season>();
            IList<SeasonTeamPlayer> stps = _db.SeasonTeamPlayers.ToList();
            IList<AnnouncedPlayer> announcedPlayers = _db.AnnouncedPlayers.ToList();
            IList<AnnounceCommunicate> AnnounceCommunicates = _db.AnnounceCommunicates.ToList();
            IList<Communicate> communicates = _db.Communicates.ToList();

            Player p1 = _db.Players.Include("STPs").Single(p => p.PlayerId == 1);

            return View();
        }
    }
}
